<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DragDropListboxTest.aspx.cs" Inherits="_Default" %>

<!--
/*
 *  Copyright (c) 2008 Howard Shank
 * Permission is hereby granted, free of charge, to any person obtaining a copy of 
 * this software and associated documentation files (the "Software"), to deal in 
 * the Software without restriction, including without limitation the rights to use, 
 * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the 
 * Software, and to permit persons to whom the Software is furnished to do so, subject 
 * to the following conditions:

 * The above copyright notice and this permission notice shall be included in all copies or 
 * substantial portions of the Software.

 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
 -->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Ajax Drag and Drop Listbox test page</title>
<script language="javascript" type="text/javascript">
// <!CDATA[

function Reset1_onclick() {

}

// ]]>
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        
            <h3>Drag and Drop tester:</h3>
            <a href="Default.aspx">Goto main page</a><br /> <br />
            Single select<br />
            <br />
            
                Action:&nbsp;
                <asp:RadioButton ID="rbActionMove" runat="server" AutoPostBack="True" GroupName="grpActions" OnCheckedChanged="grpAction_CheckedChanged" Text="Move" />
                <asp:RadioButton ID="rbActionCopy"
                    runat="server" AutoPostBack="True" GroupName="grpActions" OnCheckedChanged="grpAction_CheckedChanged" Text="Copy" />
            <br />
            
            Unique:&nbsp;
                <asp:RadioButton ID="rbUniqueTrue" runat="server" Text="True" AutoPostBack="True" GroupName="grpUnique" OnCheckedChanged="grpUnique_CheckedChanged" />
                <asp:RadioButton ID="rbUniqueFalse" runat="server" Text="False" AutoPostBack="True" GroupName="grpUnique" OnCheckedChanged="grpUnique_CheckedChanged" />
            &nbsp;<br />
            <em><strong>Browser compatibility and quirks: </strong>
                <br />
                IE 6 - Click once to select item. Then click and drag to move ite.<br />
                Firefox - Click and drag to move item to other box. (no need to select first)<br />
            </em>
            <br />
            
            From &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; To &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp; Results:<br />
            <ajaxTools:AjaxDragDropListBox ID="DragDropListBoxBase1" runat="server" SelectionMode="Multiple">
                <asp:ListItem>Item A</asp:ListItem>
                <asp:ListItem>Item B</asp:ListItem>
                <asp:ListItem>Item C</asp:ListItem>
                <asp:ListItem>Item D</asp:ListItem>
                <asp:ListItem>Item E</asp:ListItem>
            </ajaxTools:AjaxDragDropListBox>
            -&gt;
            <ajaxTools:AjaxDragDropListBox ID="DragDropListBoxBase2" runat="server" SelectionMode="Multiple">
            </ajaxTools:AjaxDragDropListBox>
            <asp:TextBox ID="txtOutput" runat="server" Height="138px" TextMode="MultiLine" Width="266px"></asp:TextBox>
            <asp:TextBox ID="txtOutput2" runat="server" Height="138px" TextMode="MultiLine" Width="261px"></asp:TextBox>
            <ajaxTools:DragDropListboxExtender ID="DragDropListboxExtender1" runat="server"
                DropTargetID="DragDropListBoxBase2" TargetControlID="DragDropListBoxBase1">
            </ajaxTools:DragDropListboxExtender>

        <br />
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Do postback" CausesValidation="False" /></div>
        <br /><br />
                <a href="Default.aspx">Goto main page</a>
    </form>
</body>
</html>
